define(['app'], function(app) {
	'use strict';

	//实例化方法
	var factory = function(Http) {
 			function get_data_luckydrawresult(result) {
			if(HTTP_ISLOGIC) {
				result = '{"success": true,"msg": "","result": {"winner": ['+
				'{"name": "张三", "order_id": "001"},'+
				'{"name": "李四","order_id": "002"}'+
				']},"session": "7311da98bd0f18eb15a96bcb263f4153"}';
				return JSON.parse(result);
			} else {
				return result;
			}
		}

		//返回信息
		return {
		   luckydrawresult: function(act_id,callback) {
				Http.post({
						method: 'marketing.seckill.winninglist',
						act_id: act_id,
						session:''
					},
					function(result) {
						//请求成功
						if(callback)
							callback(get_data_luckydrawresult(result).result);
					},
					function(e) {
						//请求异常
					},
					function() {
						//请求完成，一般不做什么事情
					});

			},
		};
	}

	factory.$inject = ['Http'];
	return app.registerService("Luckydrawresult", factory);
});